#include "headfiles.h"

using namespace std;

int main(int argc, char **argv) {
	if (argc != 2) {
		cout << "Usage: " << argv[0] << " filename" << endl;
		return 0;
	}

	char file_name[255];
	sprintf(file_name, "%s", argv[1]);

	NODE *root;
	NODE **node_list;
	int node_num;
	
	// create binary tree and get node list
	root = createBinaryTreeAll(file_name, node_list, node_num);

	// print the binary tree
	printBinaryTree(root);

	LL_NODE_HEAD *level_link_list;
	level_link_list = createLevelLinkList(root);

	printLevelLinkList(level_link_list);


	destroyTree(root);

	return 0;
}

